package com.ynding.springboot.common.annotations;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * <p> </p>
 *
 * @author ynding
 * @version 2022/7/1
 **/
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Constraint(validatedBy = IntegerValidatorClass.class)
public @interface IntegerValidator {

    int[] value() default {};

    /**
     * 参数校验失败的时候返回的默认信息
     * @return
     */
    String message() default "flag is not found";

    /**
     * 分组使用
     * @return
     */
    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
